package person.locke.regexandgame.game.zombie;

import person.locke.regexandgame.game.ability.RemoteAttackable;
import person.locke.regexandgame.game.plant.Plant;

/**
 * Created by Locker on 2018/7/4.
 */
public class RemoteAttackZombie extends Zombie implements RemoteAttackable{

    private int attack;

    public RemoteAttackZombie() {
    }

    public RemoteAttackZombie(String name, int hp, int attack) {
        super(name, hp);
        this.attack = attack;
    }


    public void remoteAttack(Object o) {

        if(o instanceof Plant)
            System.out.println("I'm a "+this.getName()+".\n"+"I'm hurting "+((Plant)o).getName()+" "+attack+" hq!");
        else
            System.out.println("I can not hurt this object. "+o);

    }
}
